home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
lib
/
udev
/
check_driver
< prev
next >
Wrap
Text File
|
2008-10-21
|
499b
|
25 lines
#!/bin/sh
#
#logger check_driver called with: $1 - $2 - $3 -
wanted=$1
devpath=$2
bustype=$3
device=$(readlink /sys/$devpath/device)
device=${device##*/}
driver=$(readlink /sys/$devpath/device/driver)
driver=${driver##*/}
logger device $device is bound to the $driver driver
if [ "$driver" != "$wanted" ]; then
logger must rebind
echo -n "$device" > /sys/$devpath/device/driver/unbind
echo -n "$device" > /sys/bus/$bustype/drivers/$wanted/bind
else
logger no need to rebind
fi